Captor Fund Management AB

CAPTOR FUND MANAGEMENT

An introduction to the openseries Python package

First we set it all up

In [10]:
from openseries.frame import OpenFrame
from openseries.series import OpenTimeSeries

from plotly.offline import init_notebook_mode
from plotly.offline import iplot
In [11]:
init_notebook_mode()

Here we fetch NAV (price per unit) for some of the Captor mutual funds

In [12]:
basket = OpenFrame(
    [
        OpenTimeSeries.from_open_nav(isin="SE0009807308"),
        OpenTimeSeries.from_open_nav(isin="SE0011337195"),
        OpenTimeSeries.from_open_nav(isin="SE0011670843"),
    ], weights=[
        0.25, 
        0.25, 
        0.50])

basket = basket.trunc_frame().to_cumret()

We then make a portfolio of the funds based on the provided weights

In [13]:
portfolio = OpenTimeSeries.from_df(basket.make_portfolio("Portfolio"))
basket = basket.add_timeseries(portfolio)

And create a Plotly plot of all the data

In [14]:
figure, _ = basket.plot_series(tick_fmt=".1%", auto_open=False, output_type="div")

We display the plot in the notebook

In [15]:
figure = figure.update_layout(legend=dict(yanchor="bottom", y=-0.22, xanchor="right", x=0.98, orientation="h"))
iplot(figure, link_text="")

Here we calculate and display a Pandas Dataframe with some analyses

In [16]:
df = basket.all_properties(properties=[
        "arithmetic_ret",
        "vol",
        "ret_vol_ratio",
        "sortino_ratio",
        "worst_month",
        "cvar_down",
        "first_indices",
        "last_indices",
    ]
)
In [17]:
df.columns = df.columns.droplevel(level=1)

formats = [
        "{:.2%}",
        "{:.2%}",
        "{:.2f}",
        "{:.2f}",
        "{:.2%}",
        "{:.2%}",
        "{:%Y-%m-%d}",
        "{:%Y-%m-%d}",
    ]

for item, f in zip(df.index, formats):
    df.loc[item] = df.loc[item].apply(
        lambda x: x if isinstance(x, str) else f.format(x)
    )
In [18]:
df
Out[18]:
Captor Iris Bond Captor Dahlia Green Bond Captor Scilla Global Equity Portfolio
Arithmetic return -5.44% -3.54% 5.96% 0.73%
Volatility 6.45% 3.33% 12.76% 7.11%
Return vol ratio -0.84 -1.06 0.47 0.10
Sortino ratio -1.15 -1.38 0.62 0.14
Worst month -6.49% -4.83% -12.25% -7.54%
CVaR 95.0% -0.99% -0.58% -1.99% -1.12%
first indices 2019-02-12 2019-02-12 2019-02-12 2019-02-12
last indices 2022-10-20 2022-10-20 2022-10-20 2022-10-20

Thank you for listening